<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<title>hello_react</title>
</head>
<body>
  <div id="test"></div>

  <script type="text/javascript" src="../../js/react.development.js" ></script>
  <script type="text/javascript" src="../../js/react-dom.development.js"></script>
  <script type="text/javascript" src="../../js/babel.min.js"></script>

  <script type="text/babel">
    /*
    js表达式: 返回一个值可被赋值给一个变量的,即为表达式
    js语句: if(){}, for(){}, switch(){}等不会返回值的
    jsx的{}中只能接收js表达式
     */
    const title = 'js框架列表';
    const data = ['Angular', 'Vue', 'React']
    const vDom = (
      <div>
        <h1>js框架列表</h1>
        <ul>
          {data.map((e, i)=>{ return <li key={i}>{e}</li>})}
        </ul>
      </div>
    )
    ReactDOM.render(vDom, document.getElementById('test'));
  </script>
</body>